import configparser as cparser

# --------- 读取config.ini配置文件 ---------------
cf = cparser.ConfigParser()
cf.read("../config/config.ini",encoding='UTF-8')
host = cf.get("mysqlconf","host")
port = int(cf.get("mysqlconf","port"))
user = cf.get("mysqlconf","user")
password = cf.get("mysqlconf","password")
db = cf.get("mysqlconf","db_name")
#
#
# database = MySQLDatabase('test', **{'charset': 'utf8', 'sql_mode': 'PIPES_AS_CONCAT', 'use_unicode': True,
# 'host': host, 'port': port, 'user': user, 'password': password})


# cmd = f"python -m pwiz -e mysql -H 127.0.0.1 -p 3306 -u root -P 123456 test >./db/db.py"
# os.system(cmd)



# python -m pwiz -e mysql -H 127.0.0.1 -p 3306 -u root -P 123456 test >./db/db.py
#                             数据库地址     端口     用户名    密码   数据库名称    生成的文件名称
















